From Small-Step Semantics to Big-Step Semantics, Automatically

نویسنده

  • Stefan Ciobaca
چکیده

Small-step semantics and big-step semantics are two styles for operationally defining the meaning of programming languages. Small-step semantics are given as a relation between program configurations, relation which denotes one computational step; big-step semantics are given as a relation directly associating to each program configuration the corresponding final configuration. Small-step semantics are useful for making precise reasonings about programs, but reasoning in big-step semantics is easier and more intuitive. When both the small-step and the bigstep semantics are needed for a language, the proof of a theorem stating that the two semantics are equivalent should also be provided in order to trust that they define the same language. We show that the big-step semantics can be automatically obtained from the small-step semantics when the small-step semantics are given by inference rules satisfying certain assumptions that we identify. The transformation that we propose is very simple and we show that when the identified assumptions are met, it is sound and complete in the sense that the two semantics are equivalent. We exemplify our transformation on a number of case studies.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Deriving Pretty-Big-Step Semantics from Small-Step Semantics

Big-step semantics for languages with abrupt termination and/or divergence suffer from a serious duplication problem, addressed by the novel ‘pretty-big-step’ style presented by Charguéraud at ESOP’13. Such rules are less concise than corresponding small-step rules, but they have the same advantages as big-step rules for program correctness proofs. Here, we show how to automatically derive pret...

متن کامل

An Operational Semantics for the Eiffel// Language

This paper formally describes the dynamic semantic of the Eiiel// language (Eiiel parallel). Eiiel// is a parallel extension of Eiiel language based on passive and active objects, asynchronous communication and wait-by-necessity. In this semantics we use formal speciications of inheritance and dynamic binding which we have deened in Natural Semantics for the Eiiel language. While in the framewo...

متن کامل

Trace-Based Coinductive Operational Semantics for While Big-Step and Small-Step, Relational and Functional Styles

We present four coinductive operational semantics for the While language accounting for both terminating and non-terminating program runs: big-step and small-step relational semantics and big-step and small-step functional semantics. The semantics employ traces (possibly infinite sequences of states) to record the states that program runs go through. The relational semantics relate statement-st...

متن کامل

Capsules and Closures: A Small-Step Approach

We present a side by side comparison of Capsules and Closures, including a proof of bisimilarity, using small-step semantics. A similar proof was presented in [8], using big-step semantics. However, while big-step semantics only allow to talk about final results of terminating computations, the use of small-step semantics allows to prove a stronger bisimilarity involving every step of the compu...

متن کامل

Pretty-Big-Step Semantics

In spite of the popularity of small-step semantics, big-step semantics remain used by many researchers. However, big-step semantics suffer from a serious duplication problem, which appears as soon as the semantics account for exceptions and/or divergence. In particular, many premises need to be copy-pasted across several evaluation rules. This duplication problem, which is particularly visible ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013